package com.ml.carManager.ui.crash;

import android.os.Bundle;

import androidx.annotation.NonNull;

import com.ml.carManager.ui.SplashActivity;

import custom.base.ui.activity.AppManager;
import custom.base.ui.activity.CrashActivity;

/**
 * Created by dundun on 15/12/31.
 */
public class HintCrashActivity extends CrashActivity {

    @Override
    public void initData(@NonNull Bundle savedInstanceState) {
        super.initData(savedInstanceState);
    }

    @Override
    public void onRestartClick() {
        AppManager.getInstance().rebootApplication(this, false, SplashActivity.class);
    }

    @Override
    public void onUpdateClick() {
//        VersionManager.getInstance(this).getVersion(this, new OnVersionListener() {
//            @Override
//            public void onGetVersion(Version version) {
//                UpdateType updateType = VersionManager.getInstance(getActivity()).getUpdateType(AppUtils.getVersionName(getActivity()), version);
//                switch (updateType) {
//                    case NONE:
//        ToastUtil.releaseShow(getActivity(), "我们已知晓该问题，但暂无针对该问题的最新版本，请耐心等候");
//                    case NORMAL:
//                    case FORCE:
//                        break;
//                }
//                VersionManager.getInstance(getActivity()).downloadAPKWithDialog(getActivity(), appApi, version);
//            }
//
//            @Override
//            public void onGetVersionFail(Call call, Throwable t) {
//
//            }
//        });
    }
}
